﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media;

namespace HeightControlAssistanceProgram.ConvertHelper
{
    /// <summary>
    /// 显示楼层选择按钮的文字颜色
    /// </summary>  
    internal class ForegroundColor_For_TextFloorNumberChoose_MultiValueConvertHelper : IMultiValueConverter
    {
        Brush brush_Choose = new SolidColorBrush(Colors.Red);
        Brush brush_UnChoose = new SolidColorBrush(Colors.Black);
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            //values[0] 当前选择的楼层  values[1] 需要对比的楼层
            if ((values[0] as List<int>).Contains((int)values[1]))
            {
                return brush_Choose;
            }
            else
            {
                return brush_UnChoose;
            }

        }
        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
